#!/bin/bash
i=1
read -p "请输入用户名前缀：" u_name
read -p "请输入要创建用户数量：" u_num
read -p "请输入所有用户密码：" u_passwd
while (( $i <= $u_num))
do
	useradd $u_name$i
	echo $u_passwd|passwd $u_name$i --stdin &>/dev/null
	((i++))
done
cat /etc/passwd
	
